package com.company;

/**
 * Created by elimydlarz on 14/04/14.
 */
public class FizzBuzzWriter {

    private static final int LOWEST = 1;
    private static final int HIGHEST = 100;

//    Create a FizzBuzz() method that prints out the numbers 1 through 100.
//    Instead of numbers divisible by three print "Fizz".
//    Instead of numbers divisible by five print "Buzz".
//    Instead of numbers divisible by three and five print "FizzBuzz".

    public void writeFizzBuzz() {
        for (int i = LOWEST; i <= HIGHEST; i++) {
            if (i % 3 == 0 && i % 5 == 0) System.out.println("FizzBuzz");
            else if (i % 5 == 0) System.out.println("Buzz");
            else if (i % 3 == 0) System.out.println("Fizz");
            else System.out.println(i);
        }
    }

}
